import { createRouter, createWebHistory } from 'vue-router';
import ConversationList from '../components/ConversationList.vue';
import PersonalChatWindow from '../components/PersonalChatWindow.vue';
import GroupChatWindow from '../components/GroupChatWindow.vue';
import Profile from '../components/Profile.vue';

const routes = [
  {
    path: '/',
    name: 'Home',
    component: ConversationList,
  },
  {
    path: '/personal/:id',
    name: 'PersonalChat',
    component: PersonalChatWindow,
  },
  {
    path: '/group/:id',
    name: 'GroupChat',
    component: GroupChatWindow,
  },
  {
    path: '/profile',
    name: 'Profile',
    component: Profile,
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;